﻿@model IEnumerable<Gfw.Web.Models.User.UserBindingInfoModel>

@{
    Layout = null;
}
@using C.Mvc
@using MvcContrib.UI.Grid;
@using (Ajax.BeginForm("List", "User", null, Gfw.Web.Common.ViewHelper.AjaxGet))
{
    @Html.Grid(Model).Columns(
            column =>
            {
                column.For(x => x.LoginName).Named("用户名");
                column.For(x => string.IsNullOrEmpty(x.IDCard) ? "无" : x.IDCard).Named("身份证号");
                column.For(x => x.IsLock ? "是" : "否").Named("锁定账户");
                column.For(x => string.IsNullOrEmpty(x.LockDate) ? "无" : x.LockDate).Named("锁定时间");
                column.For(x => string.IsNullOrEmpty(x.LockReason) ? "无" : x.LockReason).Named("说明");
                column.Custom(@<text>
        @Html.ActionLink("详情", "Details", new {userID = item.UserID}) | 
        @Html.ActionLink("编辑", "Edit", new { loginName = item.LoginName }) | 
        @Html.ActionLink("封号/解锁", "Lock", new { loginName = item.LoginName }) | 
        @Ajax.ActionLink("重置登录密码", "ResetLoginPassword", new { loginName = item.LoginName }, new AjaxOptions()
   {
       UpdateTargetId = Gfw.Web.Common.ViewHelper.AjaxContainer,
       HttpMethod = "Post",
       InsertionMode = InsertionMode.Replace,
       Confirm = "确定要重置登录密码为“123”吗？\t\r重置后请点击“收取手续费”"

   }) | 
        @Ajax.ActionLink("重置二级密码", "ResetSecondPassword", new { loginName = item.LoginName }, new AjaxOptions()
   {
       UpdateTargetId = Gfw.Web.Common.ViewHelper.AjaxContainer,
       HttpMethod = "Post",
       InsertionMode = InsertionMode.Replace,
       Confirm = "确定要重置二级密码为“123”吗？\t\r重置后请点击“收取手续费”"

   }) | 
        @Ajax.ActionLink("重置密保问题", "ResetSecurityQuestion", new { loginName = item.LoginName }, new AjaxOptions()
   {
       UpdateTargetId = Gfw.Web.Common.ViewHelper.AjaxContainer,
       HttpMethod = "Post",
       InsertionMode = InsertionMode.Replace,
       Confirm = "确定要重置密保问题吗？\t\r重置后请点击“收取手续费”"

   }) | 
        @Html.ActionLink("充值", "RechargeIndex", new {loginName = item.LoginName, userID = item.UserID}) | 
        @Ajax.ActionLink("收取手续费", "GetCommission", new { userID = item.UserID, loginName = item.LoginName }, new AjaxOptions()
   {
       UpdateTargetId = Gfw.Web.Common.ViewHelper.AjaxContainer,
       HttpMethod = "Post",
       InsertionMode = InsertionMode.Replace,
       Confirm = "确定会员已转入100元手续费吗？"

   }, new { style="color:red" })
</text>).Named("操作");

            }
    ).Attributes(id => "mytable",cellpadding=>"0",cellspacing=>"0").Empty("没有相关信息");
}